import {
	createRouter,
	createWebHistory
} from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import Strategy from '../views/strategy.vue'
import NotFound from '../views/Error404.vue'
import Index from '../views/platform/contents/index.vue'
import News from '../views/platform/contents/news.vue'

const routes = [{
		path: '/',
		name: 'home',
		component: Home,
		redirect: 'index',
		children: [
			{
			name: 'index',
			path: '/index',
			component: Index,
		}, 
		{
			name: 'news',
			path: '/news',
			component: News,
		}, 
	],
	},
	{
		path: '/strategy',
		name: 'strategy',
		component: Strategy,
	},
	{
		path: '/login',
		name: 'login',
		component: Login,
	},
	// {
	// 	path: '/home',
	// 	name: 'home',
	// 	component: Home,
	// 	redirect: 'index',
	// 	children: [{
	// 		name: 'index',
	// 		path: '/index',
	// 		component: Index,
	// 	}, ],
	// },
	{
		path: '/:pathMatch(.*)*',
		component: NotFound,
	},
]

const router = createRouter({
	history: createWebHistory(),
	routes,
})

export default router